﻿using SD.Common.PoweredByLee;
using SD.ContentSystem.Domain.Entities;
using SD.ContentSystem.IAppService.DTOs.Outputs;

namespace SD.ContentSystem.AppService.Maps
{
    /// <summary>
    /// 相片映射工具类
    /// </summary>
    public static class PhotoMap
    {
        #region # 相册映射 —— static PhotoAlbumInfo ToDTO(this PhotoAlbum...
        /// <summary>
        /// 相册映射
        /// </summary>
        /// <param name="album">相册领域模型</param>
        /// <returns>相册数据传输对象</returns>
        public static PhotoAlbumInfo ToDTO(this PhotoAlbum album)
        {
            PhotoAlbumInfo albumInfo = Transform<PhotoAlbum, PhotoAlbumInfo>.Map(album);

            return albumInfo;
        }
        #endregion

        #region # 相片映射 —— static PhotoInfo ToDTO(this Photo photo)
        /// <summary>
        /// 相片映射
        /// </summary>
        /// <param name="photo">相片领域模型</param>
        /// <returns>相片数据传输对象</returns>
        public static PhotoInfo ToDTO(this Photo photo)
        {
            PhotoInfo photoInfo = Transform<Photo, PhotoInfo>.Map(photo);

            return photoInfo;
        }
        #endregion
    }
}